package Mr.Right.util;

import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;

public class LoggerTool {
	/**
	 * 不允许通过new创建对象
	 */
	private LoggerTool(){}
	@SuppressWarnings("unchecked")
	public static Logger getLogger(Class clazz){
		Logger logger = Logger.getLogger(clazz);
		PropertyConfigurator.configure (LoggerTool.class.getClassLoader().getResource("log4j.properties"));
		return logger;
	}
}
